<!DOCTYPE html>
<html lang=en>
<head>
  <meta charset="utf-8">
  
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-transform" />
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="format-detection" content="telephone=no,email=no,adress=no">
  <!-- Color theme for statusbar -->
  <meta name="theme-color" content="#000000" />
  <!-- 强制页面在当前窗口以独立页面显示,防止别人在框架里调用页面 -->
  <meta http-equiv="window-target" content="_top" />
  
  
  <title>ObjectDetection(2)_SPP | 鲨鱼之家</title>
  <meta name="description" content="概述 SPP  为什么使用SPP SPP的具体理解和操作 SPP的特点   实验  训练过程 模型的增益来源 关于multi-size training的具体细节 测试时的具体处理方法Multi-view Testing on Feature Maps 数据结果（分类）   SPP-net for Object Detection  检测算法 模型融合   关于RCNN在同意赛事中不同任务（分">
<meta property="og:type" content="article">
<meta property="og:title" content="ObjectDetection(2)_SPP">
<meta property="og:url" content="http://tina-yao.gitee.io/bigbig-shark/2022/08/15/ObjectDetection-2-SPP/index.html">
<meta property="og:site_name" content="大鲨鱼">
<meta property="og:description" content="概述 SPP  为什么使用SPP SPP的具体理解和操作 SPP的特点   实验  训练过程 模型的增益来源 关于multi-size training的具体细节 测试时的具体处理方法Multi-view Testing on Feature Maps 数据结果（分类）   SPP-net for Object Detection  检测算法 模型融合   关于RCNN在同意赛事中不同任务（分">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://gitee.com/tina-yao/bigbig-shark/raw/master/imgs/SPPimg/1.png">
<meta property="og:image" content="https://gitee.com/tina-yao/bigbig-shark/raw/master/imgs/SPPimg/3.png">
<meta property="og:image" content="https://gitee.com/tina-yao/bigbig-shark/raw/master/imgs/SPPimg/2.png">
<meta property="og:image" content="https://gitee.com/tina-yao/bigbig-shark/raw/master/imgs/SPPimg/4.png">
<meta property="og:image" content="https://gitee.com/tina-yao/bigbig-shark/raw/master/imgs/SPPimg/5.png">
<meta property="article:published_time" content="2022-08-15T03:35:28.000Z">
<meta property="article:modified_time" content="2022-08-15T03:39:06.215Z">
<meta property="article:author" content="BigbigShark">
<meta property="article:tag" content="目标检测">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://gitee.com/tina-yao/bigbig-shark/raw/master/imgs/SPPimg/1.png">
  <!-- Canonical links -->
  <link rel="canonical" href="http://tina-yao.gitee.io/bigbig-shark/2022/08/15/ObjectDetection-2-SPP/index.html">
  
    <link rel="alternate" href="/atom.xml" title="大鲨鱼" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png" type="image/x-icon">
  
  
<link rel="stylesheet" href="/bigbig-shark/css/style.css">

  
  
  
  
<meta name="generator" content="Hexo 5.4.0"></head>


<body class="main-center theme-purple# 主题颜色 theme-black theme-blue theme-green theme-purple" itemscope itemtype="http://schema.org/WebPage">
  <header class="header" itemscope itemtype="http://schema.org/WPHeader">
  <div class="slimContent">
    <div class="navbar-header">
      
      
      <div class="profile-block text-center">
        <a id="avatar" href="https://tina-yao.gitee.io/bigbig-shark/" target="_blank">
          <img class="img-circle img-rotate" src="/bigbig-shark/images/avatar.jpg" width="200" height="200">
        </a>
        <h2 id="name" class="hidden-xs hidden-sm">大鲨鱼</h2>
        <h3 id="title" class="hidden-xs hidden-sm hidden-md">CV&amp;Robots</h3>
        <small id="location" class="text-muted hidden-xs hidden-sm"><i class="icon icon-map-marker"></i> Wuhan, China</small>
      </div>
      
      <div class="search" id="search-form-wrap">

    <form class="search-form sidebar-form">
        <div class="input-group">
            <input type="text" class="search-form-input form-control" placeholder="Search" />
            <span class="input-group-btn">
                <button type="submit" class="search-form-submit btn btn-flat" onclick="return false;"><i class="icon icon-search"></i></button>
            </span>
        </div>
    </form>
    <div class="ins-search">
  <div class="ins-search-mask"></div>
  <div class="ins-search-container">
    <div class="ins-input-wrapper">
      <input type="text" class="ins-search-input" placeholder="Type something..." x-webkit-speech />
      <button type="button" class="close ins-close ins-selectable" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
    </div>
    <div class="ins-section-wrapper">
      <div class="ins-section-container"></div>
    </div>
  </div>
</div>


</div>
      <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>
    <nav id="main-navbar" class="collapse navbar-collapse" itemscope itemtype="http://schema.org/SiteNavigationElement" role="navigation">
      <ul class="nav navbar-nav main-nav menu-highlight">
        
        
        <li class="menu-item menu-item-home">
          <a href="/bigbig-shark/.">
            
            <i class="icon icon-home-fill"></i>
            
            <span class="menu-title">Home</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-archives">
          <a href="/bigbig-shark/archives">
            
            <i class="icon icon-archives-fill"></i>
            
            <span class="menu-title">Archives</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-categories">
          <a href="/bigbig-shark/categories">
            
            <i class="icon icon-folder"></i>
            
            <span class="menu-title">Categories</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-tags">
          <a href="/bigbig-shark/tags">
            
            <i class="icon icon-tags"></i>
            
            <span class="menu-title">Tags</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-links">
          <a href="/bigbig-shark/links">
            
            <i class="icon icon-friendship"></i>
            
            <span class="menu-title">Links</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-about">
          <a href="/bigbig-shark/about">
            
            <i class="icon icon-cup-fill"></i>
            
            <span class="menu-title">About</span>
          </a>
        </li>
        
      </ul>
      
	
    <ul class="social-links">
    	
        <li><a href="https://gitee.com/tina-yao" target="_blank" title="Gitee" data-toggle=tooltip data-placement=top><i class="icon icon-gitee"></i></a></li>
        
    </ul>

    </nav>
  </div>
</header>

  
    <aside class="sidebar" itemscope itemtype="http://schema.org/WPSideBar">
  <div class="slimContent">
    
      <div class="widget">
    <h3 class="widget-title">Board</h3>
    <div class="widget-body">
        <div id="board">
            <div class="content">
                <p>欢迎交流与分享经验!</p>
            </div>
        </div>
    </div>
</div>

    
      
  <div class="widget">
    <h3 class="widget-title">Categories</h3>
    <div class="widget-body">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/bigbig-shark/categories/AI/">AI</a><span class="category-list-count">1</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/bigbig-shark/categories/AI/ML/">ML</a><span class="category-list-count">1</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/bigbig-shark/categories/Concepts/">Concepts</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/bigbig-shark/categories/Robots/">Robots</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/bigbig-shark/categories/%E5%8D%8A%E6%97%A5%E9%97%B2/">半日闲</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/bigbig-shark/categories/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1/">数学建模</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/bigbig-shark/categories/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90/">数据分析</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/bigbig-shark/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89/">计算机视觉</a><span class="category-list-count">30</span></li></ul>
    </div>
  </div>


    
      
  <div class="widget">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget-body tagcloud">
      <a href="/bigbig-shark/tags/CNN-backbones/" style="font-size: 13.67px;">CNN_backbones</a> <a href="/bigbig-shark/tags/OpenCV/" style="font-size: 13px;">OpenCV</a> <a href="/bigbig-shark/tags/Python/" style="font-size: 13px;">Python</a> <a href="/bigbig-shark/tags/ROS/" style="font-size: 13px;">ROS</a> <a href="/bigbig-shark/tags/%E4%BB%A3%E7%A0%81/" style="font-size: 13px;">代码</a> <a href="/bigbig-shark/tags/%E5%85%83%E5%AE%87%E5%AE%99/" style="font-size: 13px;">元宇宙</a> <a href="/bigbig-shark/tags/%E5%85%B4%E8%B6%A3/" style="font-size: 13px;">兴趣</a> <a href="/bigbig-shark/tags/%E5%9C%BA%E6%99%AF%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB/" style="font-size: 13px;">场景文字识别</a> <a href="/bigbig-shark/tags/%E6%91%98%E6%8A%84/" style="font-size: 13.33px;">摘抄</a> <a href="/bigbig-shark/tags/%E6%95%B0%E6%8D%AE%E9%9B%86/" style="font-size: 13px;">数据集</a> <a href="/bigbig-shark/tags/%E7%9B%AE%E6%A0%87%E6%A3%80%E6%B5%8B/" style="font-size: 14px;">目标检测</a> <a href="/bigbig-shark/tags/%E7%BE%8E%E8%B5%9B/" style="font-size: 13px;">美赛</a> <a href="/bigbig-shark/tags/%E8%81%9A%E7%B1%BB/" style="font-size: 13px;">聚类</a> <a href="/bigbig-shark/tags/%E8%87%AA%E5%8A%A8%E9%A9%BE%E9%A9%B6/" style="font-size: 13.33px;">自动驾驶</a> <a href="/bigbig-shark/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%893D/" style="font-size: 13px;">计算机视觉3D</a> <a href="/bigbig-shark/tags/%E8%BD%BB%E9%87%8F%E7%BA%A7/" style="font-size: 13px;">轻量级</a>
    </div>
  </div>

    
  </div>
</aside>

  
  
<main class="main" role="main">
  <div class="content">
  <article id="post-ObjectDetection-2-SPP" class="article article-type-post" itemscope itemtype="http://schema.org/BlogPosting">
    
    <div class="article-header">
      
        
  
    <h1 class="article-title" itemprop="name">
      ObjectDetection(2)_SPP
    </h1>
  

      
      <div class="article-meta">
        <span class="article-date">
    <i class="icon icon-calendar-check"></i>
	<a href="/bigbig-shark/2022/08/15/ObjectDetection-2-SPP/" class="article-date">
	  <time datetime="2022-08-15T03:35:28.000Z" itemprop="datePublished">2022-08-15</time>
	</a>
</span>
        
  <span class="article-category">
    <i class="icon icon-folder"></i>
    <a class="article-category-link" href="/bigbig-shark/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89/">计算机视觉</a>
  </span>

        
  <span class="article-tag">
    <i class="icon icon-tags"></i>
	<a class="article-tag-link-link" href="/bigbig-shark/tags/%E7%9B%AE%E6%A0%87%E6%A3%80%E6%B5%8B/" rel="tag">目标检测</a>
  </span>


        

	<span class="article-read hidden-xs">
    	<i class="icon icon-eye-fill" aria-hidden="true"></i>
    	<span id="/bigbig-shark/2022/08/15/ObjectDetection-2-SPP/" class="leancloud_visitors"  data-flag-title="ObjectDetection(2)_SPP">
			<span class="leancloud-visitors-count">0</span>
		</span>
    </span>

        <span class="post-comment"><i class="icon icon-comment"></i> <a href="/bigbig-shark/2022/08/15/ObjectDetection-2-SPP/#comments" class="article-comment-link">Comments</a></span>
        
	
		<span class="post-wordcount hidden-xs" itemprop="wordCount">Word Count: 1.8k(words)</span>
	
	
		<span class="post-readcount hidden-xs" itemprop="timeRequired">Read Count: 7(minutes)</span>
	

      </div>
    </div>
    <div class="article-entry marked-body" itemprop="articleBody">
      
        <!-- toc -->
<ul>
<li><a href="#%E6%A6%82%E8%BF%B0">概述</a></li>
<li><a href="#spp">SPP</a>
<ul>
<li><a href="#%E4%B8%BA%E4%BB%80%E4%B9%88%E4%BD%BF%E7%94%A8spp">为什么使用SPP</a></li>
<li><a href="#spp%E7%9A%84%E5%85%B7%E4%BD%93%E7%90%86%E8%A7%A3%E5%92%8C%E6%93%8D%E4%BD%9C">SPP的具体理解和操作</a></li>
<li><a href="#spp%E7%9A%84%E7%89%B9%E7%82%B9">SPP的特点</a></li>
</ul>
</li>
<li><a href="#%E5%AE%9E%E9%AA%8C">实验</a>
<ul>
<li><a href="#%E8%AE%AD%E7%BB%83%E8%BF%87%E7%A8%8B">训练过程</a></li>
<li><a href="#%E6%A8%A1%E5%9E%8B%E7%9A%84%E5%A2%9E%E7%9B%8A%E6%9D%A5%E6%BA%90">模型的增益来源</a></li>
<li><a href="#%E5%85%B3%E4%BA%8Emulti-size-training%E7%9A%84%E5%85%B7%E4%BD%93%E7%BB%86%E8%8A%82">关于multi-size training的具体细节</a></li>
<li><a href="#%E6%B5%8B%E8%AF%95%E6%97%B6%E7%9A%84%E5%85%B7%E4%BD%93%E5%A4%84%E7%90%86%E6%96%B9%E6%B3%95multi-view-testing-on-feature-maps">测试时的具体处理方法Multi-view Testing on Feature Maps</a></li>
<li><a href="#%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%9C%E5%88%86%E7%B1%BB">数据结果（分类）</a></li>
</ul>
</li>
<li><a href="#spp-net-for-object-detection">SPP-net for Object Detection</a>
<ul>
<li><a href="#%E6%A3%80%E6%B5%8B%E7%AE%97%E6%B3%95">检测算法</a></li>
<li><a href="#%E6%A8%A1%E5%9E%8B%E8%9E%8D%E5%90%88">模型融合</a></li>
</ul>
</li>
<li><a href="#%E5%85%B3%E4%BA%8Ercnn%E5%9C%A8%E5%90%8C%E6%84%8F%E8%B5%9B%E4%BA%8B%E4%B8%AD%E4%B8%8D%E5%90%8C%E4%BB%BB%E5%8A%A1%E5%88%86%E7%B1%BB%E5%92%8C%E6%A3%80%E6%B5%8B%E4%B8%AD%E8%A1%A8%E7%8E%B0%E5%AD%98%E5%9C%A8%E5%B7%AE%E5%BC%82%E7%9A%84%E4%B8%80%E7%82%B9%E5%8E%9F%E5%9B%A0">关于RCNN在同意赛事中不同任务（分类和检测）中表现存在差异的一点原因</a></li>
</ul>
<!-- tocstop -->
<h2><span id="概述">概述</span></h2>
<ul>
<li>已有的CNNs需要固定大小($224 \times 224$)的图片作为输入，这要求对原始图片做出rescale等一系列操作，导致损失信息或图像失真 (content loss or distortion)，降低识别精度；此外，fixing input sizes overlooks the issues involving scales (training with variable-size images increases scale-invariance and reduces over-fitting)。为了解决这些问题，提出了<strong>SPP (Spatial Pyramid Pooling)</strong>，它可以实现从任何规模图片上生成一个固定长度的特征表示。</li>
<li>此外，使用SPP可以避免重复地计算卷积特征，从full image上一次性提取特征图。因此，SPP的速度更快，$24-102 \times$ faster than the R-CNN。</li>
<li>同时，the accuracy is comparable with R-CNN。实际上准确率上的提升个人认为几乎没有，主要是训练和测试所需的时间大大减少。</li>
<li>引入SPP后的神经网络被叫做SPP-net。</li>
</ul>
<h2><span id="spp">SPP</span></h2>
<h3><span id="为什么使用spp">为什么使用SPP</span></h3>
<ul>
<li>
<p>事实上，卷积层对输入的尺度并没有任何要求；因为卷积层的操作方式实质是一个滑动窗口。</p>
</li>
<li>
<p>真正对输入尺度有要求的是：全连接层；由此可以得知，整个神经网络对输入图片尺度的严格要求仅仅来自于这个全连接层。</p>
</li>
<li>
<p>所以，相比在最开始就rescale输入图片，作者团队在整个神经网络的卷积层和其后的全连接层之间加入了SPP：</p>
<ul>
<li>The SPP layer pools the features and generates fixed-length outputs, which are then fed into the fully-connected layers (or other classifiers).</li>
<li>In other words, we perform some information “aggregation” at a deeper stage of the network hierarchy (between convolutional layers and fully-connected layers) to avoid the need for cropping or warping at the beginning.</li>
</ul>
<p><img src="https://gitee.com/tina-yao/bigbig-shark/raw/master/imgs/SPPimg/1.png" alt></p>
</li>
</ul>
<h3><span id="spp的具体理解和操作">SPP的具体理解和操作</span></h3>
<p><strong>理解</strong>：如下图中蓝色部分，意指将conv5输出的特征图映射成$4 \times 4 = 16$份，即蓝色部分将特征图映射为$16 \times channels$维；绿色部分将特征图映射为$4 \times channels$维；灰色部分将特征图映射为$1 \times channels$维；所以总共是$(16 + 4 + 1) \times channels = 21 \times channels$维，将其flatten成一维向量再送入全连接层即可。</p>
<p><img src="https://gitee.com/tina-yao/bigbig-shark/raw/master/imgs/SPPimg/3.png" alt="image-20220812005543927"></p>
<ol>
<li>SPP是比BoW的更好的获得固定大小特征向量的一种方法，SPP通过pooling in local spatial bins来保持空间信息。</li>
<li>这些spatial bins大小可变而数量不可变，这和sliding windows恰好反过来。</li>
<li>在本实验中，具体使用的pooling方法是max pooling。</li>
<li>The outputs of the SPP are kM-dimensional vectors with the number of bins denoted as M (k is the number of filters in the last convolutional layer, 即channel数).</li>
</ol>
<h3><span id="spp的特点">SPP的特点</span></h3>
<ol>
<li>SPP is able to generate a fixed-length output regardless of the input size, while the sliding window pooling used in the previous deep networks cannot;</li>
<li>SPP uses multi-level spatial bins, while the sliding window pooling uses only a single window size. Multi-level pooling has been shown to the robust to object deformations;</li>
<li>SPP can pool features extracted at variable scales thanks to the flexibility of input scales.</li>
</ol>
<p>通过实验，发现以上三个要素都有助于提高识别精度。</p>
<h2><span id="实验">实验</span></h2>
<h3><span id="训练过程">训练过程</span></h3>
<p>由于GPU训练的优化是针对固定大小的图片输入进行的，因此多规模输入的训练在实际过程中是没有单规模好的，由此提出解决方案：先进行single-size training，这样既能利用GPU的优化，又能进行空间金字塔池化操作；再进行multi-size training，这样能够学习不同输入尺度的图片。</p>
<ol>
<li>Single-size training: The main purpose of the single-size training is to enable the <strong>multi-level pooling behavior</strong>. Experiments show that this is one reason for gain of accuracy.</li>
<li>Multi-size training
<ul>
<li>$224 \times 224$</li>
<li>$180 \times 180$</li>
<li>除了上述两种规模，还测试了其他输入大小$s \times s$，其中$s$是从[180, 224]中随机均匀采样的。</li>
</ul>
</li>
</ol>
<h3><span id="模型的增益来源">模型的增益来源</span></h3>
<ol>
<li>Multi-level pooling (from single-size training)</li>
<li>Multi-size training</li>
<li>Full-image Representations</li>
</ol>
<h3><span id="关于multi-size-training的具体细节">关于multi-size training的具体细节</span></h3>
<ul>
<li>SPP allows training with variable-size images, which increases scale-invariance (标度不变性) and reduces over-fitting.</li>
<li>在每轮训练中，都给定当前的图片输入尺度后再训练，然后换一个输入图片尺度再进行下一轮训练。</li>
<li>实验证明，这种多尺度输入的训练方式和传统固定输入的训练方式相比，收敛速度一样，测试集上的精度更高 (In each epoch we train the network with a given input size, and switch to another input size for the next epoch. Experiments show that this multi-size training converges just as the traditional single-size training, and leads to better testing accuracy)。</li>
</ul>
<h3><span id="测试时的具体处理方法multi-view-testing-on-feature-maps">测试时的具体处理方法Multi-view Testing on Feature Maps</span></h3>
<ol>
<li>Resize an image so min(w, h) = s where s represents a predefined scale (like 256).</li>
<li>Then compute the convolutional feature maps from the entire image.</li>
<li>考虑到使用过翻转的图片，同时计算其翻转图片的特征图。</li>
<li>Given any view (window) in the image, map this window to the feature maps, and then use SPP to pool the features from this window.（注意训练时，是直接计算整张图的feature maps）</li>
<li>Last, the pooled features are then fed into the fc layers.</li>
</ol>
<p>For the <strong>standard 10-view</strong>, use s = 256 and the views are $224 \times 224$ windows on the corners or center.</p>
<h3><span id="数据结果分类">数据结果（分类）</span></h3>
<p><img src="https://gitee.com/tina-yao/bigbig-shark/raw/master/imgs/SPPimg/2.png" alt></p>
<h2><span id="spp-net-for-object-detection">SPP-net for Object Detection</span></h2>
<ul>
<li>
<p>R-CNN重复地对大约两千个候选区域进行特征提取，非常耗时，使得特征提取成为其测试时的主要时效瓶颈。</p>
</li>
<li>
<p>而SPP-net只需要从full image提取一次特征，然后就可以借助SPP从CNN提取的特征图上进行pool，得到固定长度的特征表示。因为耗时的CNN提取特征过程只需要进行一次，所以时效性大大提升。</p>
</li>
<li>
<p>和R-CNN相比，主要是快，但精度提升不大。</p>
<p><img src="https://gitee.com/tina-yao/bigbig-shark/raw/master/imgs/SPPimg/4.png" alt></p>
</li>
</ul>
<h3><span id="检测算法">检测算法</span></h3>
<ul>
<li>‘fast’ mode of selective search to generate about 2000 candidate windows per image.</li>
<li>Resize the image and extract the feature maps from the entire image.</li>
<li>In each candidate, we use a 4-level SPP($1\times1, 2\times2, 3\times 3, 6\times 6$, totally 50 bins) to pool the features. This generates a 12800-d ($256\times50$) representation for each window.</li>
<li>These representations are provided to the fully-connected layers of the network.</li>
<li>And then we train a binary linear SVM classifier for each category on these features.</li>
</ul>
<h3><span id="模型融合">模型融合</span></h3>
<p>仅仅使用不同的初始化，其他步骤一模一样，训练出一个模型SPPnet(2)，结果如下图：</p>
<p><img src="https://gitee.com/tina-yao/bigbig-shark/raw/master/imgs/SPPimg/5.png" alt></p>
<p>由上图可知：</p>
<ol>
<li><strong>具体的融合方式</strong>：先使用模型(1)预测出检测框，再使用模型(2)在同一张图上预测出检测框（顺序可以反过来），最后使用非极大值抑制，筛选出最后的检测框。</li>
<li>融合后的模型表现提升，说明模型(1)和模型(2)是互补的。</li>
<li>互补的原因：主要来源于卷积层。比如说当卷积部分一模一样时，初始化不同的两个模型微调好后再融合是没有提升的。需要卷积不同。</li>
</ol>
<h2><span id="关于rcnn在同意赛事中不同任务分类和检测中表现存在差异的一点原因">关于RCNN在同意赛事中不同任务（分类和检测）中表现存在差异的一点原因</span></h2>
<ol>
<li>任务难度就不一样；</li>
<li>目标检测比赛中数据集更小，说明了大数据集在深度学习中的重要性。</li>
</ol>

      
    </div>
    <div class="article-footer">
      <blockquote class="mt-2x">
  <ul class="post-copyright list-unstyled">
    
    <li class="post-copyright-link hidden-xs">
      <strong>本文链接：</strong>
      <a href="http://tina-yao.gitee.io/bigbig-shark/2022/08/15/ObjectDetection-2-SPP/" title="ObjectDetection(2)_SPP" target="_blank" rel="external">http://tina-yao.gitee.io/bigbig-shark/2022/08/15/ObjectDetection-2-SPP/</a>
    </li>
    
    <li class="post-copyright-license">
      <strong>版权声明： </strong> 本博客所有文章除特别声明外，均采用 <a href="http://creativecommons.org/licenses/by/4.0/deed.zh" target="_blank" rel="external">CC BY 4.0 CN协议</a> 许可协议。转载请注明出处！
    </li>
  </ul>
</blockquote>


<div class="panel panel-default panel-badger">
  <div class="panel-body">
    <figure class="media">
      <div class="media-left">
        <a href="https://tina-yao.gitee.io/bigbig-shark/" target="_blank" class="img-burn thumb-sm visible-lg">
          <img src="/bigbig-shark/images/avatar.jpg" class="img-rounded w-full" alt="">
        </a>
      </div>
      <div class="media-body">
        <h3 class="media-heading"><a href="https://tina-yao.gitee.io/bigbig-shark/" target="_blank"><span class="text-dark">大鲨鱼</span><small class="ml-1x">CV&amp;Robots</small></a></h3>
        <div>格物致知，诚意力行。</div>
      </div>
    </figure>
  </div>
</div>


    </div>
  </article>
  
    
  <section id="comments">
  	
      <div id="vcomments"></div>
    
  </section>


  
</div>

  <nav class="bar bar-footer clearfix" data-stick-bottom>
  <div class="bar-inner">
  
  <ul class="pager pull-left">
    
    <li class="prev">
      <a href="/bigbig-shark/2022/08/16/ObjectDetection-3-Fast-RCNN/" title="ObjectDetection(3)_Fast_RCNN"><i class="icon icon-angle-left" aria-hidden="true"></i><span>&nbsp;&nbsp;Newer</span></a>
    </li>
    
    
    <li class="next">
      <a href="/bigbig-shark/2022/08/15/ObjectDetection-1-RCNN/" title="ObjectDetection(1)_RCNN"><span>Older&nbsp;&nbsp;</span><i class="icon icon-angle-right" aria-hidden="true"></i></a>
    </li>
    
    
  </ul>
  
  
  <!-- Button trigger modal -->
  <button type="button" class="btn btn-fancy btn-donate pop-onhover bg-gradient-warning" data-toggle="modal" data-target="#donateModal"><span>$</span></button>
  <!-- <div class="wave-icon wave-icon-danger btn-donate" data-toggle="modal" data-target="#donateModal">
    <div class="wave-circle"><span class="icon"><i class="icon icon-bill"></i></span></div>
  </div> -->
  
  
  <div class="bar-right">
    
    <div class="share-component" data-sites="weibo,qq,wechat" data-mobile-sites="weibo,qq"></div>
    
  </div>
  </div>
</nav>
  
<!-- Modal -->
<div class="modal modal-center modal-small modal-xs-full fade" id="donateModal" tabindex="-1" role="dialog">
  <div class="modal-dialog" role="document">
    <div class="modal-content donate">
      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      <div class="modal-body">
        <div class="donate-box">
          <div class="donate-head">
            <p>Maybe you could buy me a cup of coffee.</p>
          </div>
          <div class="tab-content">
            <div role="tabpanel" class="tab-pane fade active in" id="alipay">
              <div class="donate-payimg">
                <img src="https://gitee.com/tina-yao/bigbig-shark/raw/master/images/donate/alipayimg.PNG#images/donate/alipayimg.png" alt="Scan Qrcode" title="Scan" />
              </div>
              <p class="text-muted mv">Scan this qrcode</p>
              <p class="text-grey">Open alipay app scan this qrcode, buy me a coffee!</p>
            </div>
            <div role="tabpanel" class="tab-pane fade" id="wechatpay">
              <div class="donate-payimg">
                <img src="https://gitee.com/tina-yao/bigbig-shark/raw/master/images/donate/wechatpayimg.PNG#images/donate/wechatpayimg.png" alt="Scan Qrcode" title="Scan" />
              </div>
              <p class="text-muted mv">Scan this qrcode</p>
              <p class="text-grey">Open wechat app scan this qrcode, buy me a coffee!</p>
            </div>
          </div>
          <div class="donate-footer">
            <ul class="nav nav-tabs nav-justified" role="tablist">
              <li role="presentation" class="active">
                <a href="#alipay" id="alipay-tab" role="tab" data-toggle="tab" aria-controls="alipay" aria-expanded="true"><i class="icon icon-alipay"></i> alipay</a>
              </li>
              <li role="presentation" class="">
                <a href="#wechatpay" role="tab" id="wechatpay-tab" data-toggle="tab" aria-controls="wechatpay" aria-expanded="false"><i class="icon icon-wepay"></i> wechat payment</a>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>



</main>

  <footer class="footer" itemscope itemtype="http://schema.org/WPFooter">
	
	
    <ul class="social-links">
    	
        <li><a href="https://gitee.com/tina-yao" target="_blank" title="Gitee" data-toggle=tooltip data-placement=top><i class="icon icon-gitee"></i></a></li>
        
    </ul>

    <div class="copyright">
    	
        &copy; 2023 BigbigShark
        
        <div class="publishby">
        <!--
        	Theme by <a href="https://github.com/cofess" target="_blank"> cofess </a>base on <a href="https://github.com/cofess/hexo-theme-pure" target="_blank">pure</a>.
        -->
        </div>
    </div>
</footer>
  <script src="//cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')
</script>

<script src="/bigbig-shark/js/plugin.min.js"></script>


<script src="/bigbig-shark/js/application.js"></script>


    <script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: 'Posts',
            PAGES: 'Pages',
            CATEGORIES: 'Categories',
            TAGS: 'Tags',
            UNTITLED: '(Untitled)',
        },
        ROOT_URL: '/bigbig-shark/',
        CONTENT_URL: '/bigbig-shark/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>

<script src="/bigbig-shark/js/insight.js"></script>






   




   
    
  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/valine"></script>
  <script type="text/javascript">
  var GUEST = ['nick', 'mail', 'link'];
  var meta = 'nick,mail,link';
  meta = meta.split(',').filter(function(item) {
    return GUEST.indexOf(item) > -1;
  });
  new Valine({
    el: '#vcomments',
    verify: false,
    notify: false,
    appId: '8pTCCvyyLGXskH0XW0fWHg7l-gzGzoHsz',
    appKey: 'id3rlCPRdbEoSpUfhJgcLhDO',
    placeholder: 'Just go go',
    avatar: 'mm',
    meta: meta,
    pageSize: '10' || 10,
    visitor: true
  });
  </script>

     







<script src="/bigbig-shark/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginModelPath":"assets/","model":{"jsonPath":"/bigbig-shark/live2dw/assets/tororo.model.json"},"display":{"position":null,"width":300,"height":600},"log":false,"pluginJsPath":"lib/","pluginRootPath":"live2dw/","tagMode":false});</script></body>
</html>